import request from "@/utils/request.js"
import {pwd} from "@/config/config"
import Cache from '@/utils/cache';
import { LOGIN_STATUS } from '@/config/store';
const token = Cache.get(LOGIN_STATUS)
console.log('token',token)
/**
 * 群主查所有会员信息
*/ 
export function getLoadUserList(param){
	let params={
		pwd:pwd,
		token:token,
		list_rows:param.list_rows,
		page:param.page,
		is_zt:param.is_zt===0 ? '':param.is_zt,
		wx_name:param.wx_name
	}
  return request.post('yx/load_user_indexx',params,{noAuth:true});
}

/**
 * 把会员加入黑名单/解除黑名单
*/ 
export function setBlack(param){
	let params={
		pwd:pwd,
		token:token,
		uid:param.id,
		is_zt:param.state
	}
  return request.post('yx/load_user_iszt',params);
}

/**
 * 发送短信 群主绑定手机号
*/ 
export function getCode(phone){
	let params={
		pwd:pwd,
		token:token,
		tel:phone
	}
  return request.post('yx/code_fas',params);
}

/**
 * 验证验证码是否正确 群主修改手机号
*/ 
export function EidtCode(param){
	let params={
		pwd:pwd,
		token:token,
		tel:param.phone,
		code:param.code
	}
  return request.post('yx/yanz_code',params);
}

/**
 * 获取群主信息
*/ 
export function my_load(param){
	let params={
		pwd:pwd,
		token:token,
        ...param
	}
  return request.post('yx/my_load',params);
}

/**
 * 是否可注册
*/ 
export function aduser_user_state(param){
	let params={
		pwd:pwd,
		token:token,
        ...param
	}
  return request.post('yx/aduser_user_state',params);
}




    